#ifndef  _TRANSFER_DRIVER_H_
#define  _TRANSFER_DRIVER_H_

#ifdef _cplusplus
extern "c"{
#endif

#include "typedef.h"
#include "Common_define.h"

struct _tagTransfer;
typedef int (*TransferFun)(struct _tagTransfer* pTransfer, uint8* pData, uint8 len);
typedef struct _tagTransfer
{
    TransferFun TxData;    
}Transfer;

//////////////////////////////////////////////////////////////////////
typedef void (*IicTransferRxDataFun)(uint8 ChanNum, uint8 EventInd);
typedef struct _tagIicTransfer
{
	Transfer m_base;
	
	uint8 m_bChannel;
	uint8 m_bEventMask;
	
}IicTransfer;

void IicTransfer_Init(IicTransfer* pTransfer, uint8 localIpmbAddress, uint8 channel, uint8 rxBuffNum);

//////////////////////////////////////////////////////////////////////
typedef struct _tagIic2Transfer
{
	IicTransfer m_base;
	
	uint8 m_Channels[2];
}Iic2Transfer;

void Iic2Transfer_Init(Iic2Transfer* pIic2Transfer, uint8 localIpmbAddress, uint8 channel1, uint8 rxBufNum1, uint8 channel2, uint8 rxBufNum2);


//Uart Api
int Uart_TxData(unsigned char uartId, unsigned char* pData, unsigned char len);
void UartTransfer_RxDataCallBack(unsigned char uartId, unsigned char* pData, unsigned char len);


//////////////////////////////////////////////////////////////////////
typedef struct _tagUartTransfer
{
	Transfer m_base;	
	uint8 m_uartId;
}UartTransfer;

void UartTransfer_Init(UartTransfer* pTransfer, uint8 uartId);

#ifdef _cplusplus
}
#endif

#endif

